home *** CD-ROM | disk | FTP | other *** search
- /**/
-
- signal on halt
- signal on break_c
-
- l="rmh.library";if ~show("L",l) then;if ~addlib(l,0,-30) then exit
- if AddLibrary("rxmui.library")~=0 then exit
- call rxmuiopt("debugmode showerr")
-
- call createApp
- call SetNotifies
-
- call set("win","open",1)
- call getattr("win","open","o")
- if o=0 then do
- say "can't open window"
- exit
- end
-
- call handleApp
- exit
- /***********************************************************************/
- handleApp: procedure
- ctrl_c=2**12
- s=0
- do forever
- call handle("APP","H",s)
- do i=0 to h.num-1
- if h.i="QUIT" then exit
- say h.num-1 h.i
- end
- s=Wait(or(h.signals,ctrl_c))
- if and(s,ctrl_c)>0 then exit
- end
- exit
- /***********************************************************************/
- err: procedure expose sigl rxmuierror
- parse arg res
- say sigl "["res"]"
- say getrxmuistring(res) "in line" sigl-1 rxmuierror
- exit
- /***********************************************************************/
- createApp: procedure
- app.Title="Speedbar"
- app.Version="$VER: Speedbar 1.0 (10.12.99)"
- app.Copyright="©1999, alfie"
- app.Author="alfie"
- app.Description="Speedbar example"
- app.Base="SPEEDBAR"
- app.SubWindow="WIN"
- win.ID="MAIN"
- win.Title="Speedbar Example"
- win.Contents="MGROUP"
- mgroup.0="SPG"
- spg.class="GROUP"
- spg.horiz=1
- spg.0="SPEEDBAR"
- speedbar.class="SPEEDBAR"
- speedbar.spread=0
- speedbar.Horiz=1
- speedbar.RaisingFrame=1
- speedbar.Borderless=1
- speedbar.0.Img="Pics/back.iff"
- speedbar.0.Text="Back"
- speedbar.1.Img="Pics/forward.iff"
- speedbar.1.Text="Forward"
- speedbar.2.Img="Pics/reload.iff"
- speedbar.2.Text="Reload"
- speedbar.3.Img="Pics/stop.iff"
- speedbar.3.Text="Stop"
- speedbar.4.Img="SPACER"
- speedbar.5.Img="Pics/home.iff"
- speedbar.5.Text="Home"
- speedbar.6.Img="Pics/find.iff"
- speedbar.6.Text="Find"
- spg.1=hspace()
- mgroup.1=HBar()
- mgroup.2=vspace()
- cg.class="group"
- cg.0="cgf"
- cgf.class="group"
- cgf.columns=4
- cgf.0=label("_BorderLess")
- cgf.1=checkmark("BL",1,'b')
- cgf.2=label("_RaisingFrame")
- cgf.3=checkmark("RF",1,'r')
- cgf.4=label("_SmallImages")
- cgf.5=checkmark("SI",,'s')
- cgf.6=label("Sunn_y")
- cgf.7=checkmark("SN",,'y')
- cg.1=MakeObj(,"HGroup",label("_View Mode"),MakeObj("cycle","Cycle","TextGfx|Gfx|Text","v"))
- mgroup.3=MakeObj(,"HFRAMEGROUP","Config",MakeObj(,"HCenter","cg"))
- mgroup.4=vspace()
-
- res=NewObj("APPLICATION","APP")
- if res~=0 then do
- ioerr=IoErr()
- say ioerr
- call err(res)
- end
- return
- /***********************************************************************/
- setNotifies: procedure
- res=Notify("WIN","CLOSEREQUEST",1,"APP","RETURNID","QUIT")
- if res~=0 then call err(res)
- res=Notify("BL","SELECTED","EVERYTIME","SPEEDBAR","SET","BORDERLESS","TRIGGERVALUE")
- if res~=0 then call err(res)
- res=Notify("RF","SELECTED","EVERYTIME","SPEEDBAR","SET","RAISINGFRAME","TRIGGERVALUE")
- if res~=0 then call err(res)
- res=Notify("SI","SELECTED","EVERYTIME","SPEEDBAR","SET","SMALLIMAGES","TRIGGERVALUE")
- if res~=0 then call err(res)
- res=Notify("SN","SELECTED","EVERYTIME","SPEEDBAR","SET","SUNNY","TRIGGERVALUE")
- if res~=0 then call err(res)
- res=Notify("SPEEDBAR.0","PRESSED",0,"APP","RETURNID")
- if res~=0 then call err(res)
- res=Notify("CYCLE","ACTIVE",0,"APP","RETURNID")
- if res~=0 then call err(res)
- res=Notify("CYCLE","ACTIVE",0,"SPEEDBAR","SET","VIEWMODE","TEXTGFX")
- if res~=0 then call err(res)
- res=Notify("CYCLE","ACTIVE",2,"SPEEDBAR","SET","VIEWMODE","TEXT")
- if res~=0 then call err(res)
- res=Notify("CYCLE","ACTIVE",1,"SPEEDBAR","SET","VIEWMODE","GFX")
- if res~=0 then call err(res)
- return
- /***********************************************************************/
- halt:
- break_c:
- exit
- /**************************************************************************/
-